Integrand size = 18, antiderivative size = 125 \[ \int x^3 \left (a+b \csc \left (c+d x^2\right )\right )^2 \, dx=\frac {a^2 x^4}{4}-\frac {2 a b x^2 \text {arctanh}\left (e^{i \left (c+d x^2\right )}\right )}{d}-\frac {b^2 x^2 \cot \left (c+d x^2\right )}{2 d}+\frac {b^2 \log \left (\sin \left (c+d x^2\right )\right )}{2 d^2}+\frac {i a b \operatorname {PolyLog}\left (2,-e^{i \left (c+d x^2\right )}\right )}{d^2}-\frac {i a b \operatorname {PolyLog}\left (2,e^{i \left (c+d x^2\right )}\right )}{d^2} \]
1/4*a^2*x^4-2*a*b*x^2*arctanh(exp(I*(d*x^2+c)))/d-1/2*b^2*x^2*cot(d*x^2+c) /d+1/2*b^2*ln(sin(d*x^2+c))/d^2+I*a*b*polylog(2,-exp(I*(d*x^2+c)))/d^2-I*a *b*polylog(2,exp(I*(d*x^2+c)))/d^2
Both result and optimal contain complex but leaf count is larger than twice the leaf count of optimal. \(268\) vs. \(2(125)=250\).
Time = 5.77 (sec) , antiderivative size = 268, normalized size of antiderivative = 2.14 \[ \int x^3 \left (a+b \csc \left (c+d x^2\right )\right )^2 \, dx=\frac {2 b^2 d x^2 \cot (c)+d x^2 \left (a^2 d x^2-2 b^2 \cot (c)\right )-2 b^2 \left (d x^2 \cot (c)-\log \left (\sin \left (c+d x^2\right )\right )\right )+4 a b \left (2 \arctan (\tan (c)) \text {arctanh}\left (\cos (c)-\sin (c) \tan \left (\frac {d x^2}{2}\right )\right )+\frac {\left (\left (d x^2+\arctan (\tan (c))\right ) \left (\log \left (1-e^{i \left (d x^2+\arctan (\tan (c))\right )}\right )-\log \left (1+e^{i \left (d x^2+\arctan (\tan (c))\right )}\right )\right )+i \operatorname {PolyLog}\left (2,-e^{i \left (d x^2+\arctan (\tan (c))\right )}\right )-i \operatorname {PolyLog}\left (2,e^{i \left (d x^2+\arctan (\tan (c))\right )}\right )\right ) \sec (c)}{\sqrt {\sec ^2(c)}}\right )+b^2 d x^2 \csc \left (\frac {c}{2}\right ) \csc \left (\frac {1}{2} \left (c+d x^2\right )\right ) \sin \left (\frac {d x^2}{2}\right )+b^2 d x^2 \sec \left (\frac {c}{2}\right ) \sec \left (\frac {1}{2} \left (c+d x^2\right )\right ) \sin \left (\frac {d x^2}{2}\right )}{4 d^2} \]
(2*b^2*d*x^2*Cot[c] + d*x^2*(a^2*d*x^2 - 2*b^2*Cot[c]) - 2*b^2*(d*x^2*Cot[ c] - Log[Sin[c + d*x^2]]) + 4*a*b*(2*ArcTan[Tan[c]]*ArcTanh[Cos[c] - Sin[c ]*Tan[(d*x^2)/2]] + (((d*x^2 + ArcTan[Tan[c]])*(Log[1 - E^(I*(d*x^2 + ArcT an[Tan[c]]))] - Log[1 + E^(I*(d*x^2 + ArcTan[Tan[c]]))]) + I*PolyLog[2, -E ^(I*(d*x^2 + ArcTan[Tan[c]]))] - I*PolyLog[2, E^(I*(d*x^2 + ArcTan[Tan[c]] ))])*Sec[c])/Sqrt[Sec[c]^2]) + b^2*d*x^2*Csc[c/2]*Csc[(c + d*x^2)/2]*Sin[( d*x^2)/2] + b^2*d*x^2*Sec[c/2]*Sec[(c + d*x^2)/2]*Sin[(d*x^2)/2])/(4*d^2)
Time = 0.36 (sec) , antiderivative size = 124, normalized size of antiderivative = 0.99, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {4693, 3042, 4678, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int x^3 \left (a+b \csc \left (c+d x^2\right )\right )^2 \, dx\) |
\(\Big \downarrow \) 4693 |
\(\displaystyle \frac {1}{2} \int x^2 \left (a+b \csc \left (d x^2+c\right )\right )^2dx^2\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{2} \int x^2 \left (a+b \csc \left (d x^2+c\right )\right )^2dx^2\) |
\(\Big \downarrow \) 4678 |
\(\displaystyle \frac {1}{2} \int \left (a^2 x^2+b^2 \csc ^2\left (d x^2+c\right ) x^2+2 a b \csc \left (d x^2+c\right ) x^2\right )dx^2\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {1}{2} \left (\frac {a^2 x^4}{2}-\frac {4 a b x^2 \text {arctanh}\left (e^{i \left (c+d x^2\right )}\right )}{d}+\frac {2 i a b \operatorname {PolyLog}\left (2,-e^{i \left (d x^2+c\right )}\right )}{d^2}-\frac {2 i a b \operatorname {PolyLog}\left (2,e^{i \left (d x^2+c\right )}\right )}{d^2}+\frac {b^2 \log \left (\sin \left (c+d x^2\right )\right )}{d^2}-\frac {b^2 x^2 \cot \left (c+d x^2\right )}{d}\right )\) |
((a^2*x^4)/2 - (4*a*b*x^2*ArcTanh[E^(I*(c + d*x^2))])/d - (b^2*x^2*Cot[c + d*x^2])/d + (b^2*Log[Sin[c + d*x^2]])/d^2 + ((2*I)*a*b*PolyLog[2, -E^(I*( c + d*x^2))])/d^2 - ((2*I)*a*b*PolyLog[2, E^(I*(c + d*x^2))])/d^2)/2
3.1.10.3.1 Defintions of rubi rules used
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(n_.)*((c_.) + (d_.)*(x_))^(m_.) , x_Symbol] :> Int[ExpandIntegrand[(c + d*x)^m, (a + b*Csc[e + f*x])^n, x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && IGtQ[m, 0] && IGtQ[n, 0]
Int[((a_.) + Csc[(c_.) + (d_.)*(x_)^(n_)]*(b_.))^(p_.)*(x_)^(m_.), x_Symbol ] :> Simp[1/n Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a + b*Csc[c + d*x])^ p, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p}, x] && IGtQ[Simplify[(m + 1)/n], 0] && IntegerQ[p]
\[\int x^{3} {\left (a +b \csc \left (d \,x^{2}+c \right )\right )}^{2}d x\]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 451 vs. \(2 (107) = 214\).
Time = 0.29 (sec) , antiderivative size = 451, normalized size of antiderivative = 3.61 \[ \int x^3 \left (a+b \csc \left (c+d x^2\right )\right )^2 \, dx=\frac {a^{2} d^{2} x^{4} \sin \left (d x^{2} + c\right ) - 2 \, b^{2} d x^{2} \cos \left (d x^{2} + c\right ) - 2 i \, a b {\rm Li}_2\left (\cos \left (d x^{2} + c\right ) + i \, \sin \left (d x^{2} + c\right )\right ) \sin \left (d x^{2} + c\right ) + 2 i \, a b {\rm Li}_2\left (\cos \left (d x^{2} + c\right ) - i \, \sin \left (d x^{2} + c\right )\right ) \sin \left (d x^{2} + c\right ) - 2 i \, a b {\rm Li}_2\left (-\cos \left (d x^{2} + c\right ) + i \, \sin \left (d x^{2} + c\right )\right ) \sin \left (d x^{2} + c\right ) + 2 i \, a b {\rm Li}_2\left (-\cos \left (d x^{2} + c\right ) - i \, \sin \left (d x^{2} + c\right )\right ) \sin \left (d x^{2} + c\right ) - {\left (2 \, a b d x^{2} - b^{2}\right )} \log \left (\cos \left (d x^{2} + c\right ) + i \, \sin \left (d x^{2} + c\right ) + 1\right ) \sin \left (d x^{2} + c\right ) - {\left (2 \, a b d x^{2} - b^{2}\right )} \log \left (\cos \left (d x^{2} + c\right ) - i \, \sin \left (d x^{2} + c\right ) + 1\right ) \sin \left (d x^{2} + c\right ) - {\left (2 \, a b c - b^{2}\right )} \log \left (-\frac {1}{2} \, \cos \left (d x^{2} + c\right ) + \frac {1}{2} i \, \sin \left (d x^{2} + c\right ) + \frac {1}{2}\right ) \sin \left (d x^{2} + c\right ) - {\left (2 \, a b c - b^{2}\right )} \log \left (-\frac {1}{2} \, \cos \left (d x^{2} + c\right ) - \frac {1}{2} i \, \sin \left (d x^{2} + c\right ) + \frac {1}{2}\right ) \sin \left (d x^{2} + c\right ) + 2 \, {\left (a b d x^{2} + a b c\right )} \log \left (-\cos \left (d x^{2} + c\right ) + i \, \sin \left (d x^{2} + c\right ) + 1\right ) \sin \left (d x^{2} + c\right ) + 2 \, {\left (a b d x^{2} + a b c\right )} \log \left (-\cos \left (d x^{2} + c\right ) - i \, \sin \left (d x^{2} + c\right ) + 1\right ) \sin \left (d x^{2} + c\right )}{4 \, d^{2} \sin \left (d x^{2} + c\right )} \]
1/4*(a^2*d^2*x^4*sin(d*x^2 + c) - 2*b^2*d*x^2*cos(d*x^2 + c) - 2*I*a*b*dil og(cos(d*x^2 + c) + I*sin(d*x^2 + c))*sin(d*x^2 + c) + 2*I*a*b*dilog(cos(d *x^2 + c) - I*sin(d*x^2 + c))*sin(d*x^2 + c) - 2*I*a*b*dilog(-cos(d*x^2 + c) + I*sin(d*x^2 + c))*sin(d*x^2 + c) + 2*I*a*b*dilog(-cos(d*x^2 + c) - I* sin(d*x^2 + c))*sin(d*x^2 + c) - (2*a*b*d*x^2 - b^2)*log(cos(d*x^2 + c) + I*sin(d*x^2 + c) + 1)*sin(d*x^2 + c) - (2*a*b*d*x^2 - b^2)*log(cos(d*x^2 + c) - I*sin(d*x^2 + c) + 1)*sin(d*x^2 + c) - (2*a*b*c - b^2)*log(-1/2*cos( d*x^2 + c) + 1/2*I*sin(d*x^2 + c) + 1/2)*sin(d*x^2 + c) - (2*a*b*c - b^2)* log(-1/2*cos(d*x^2 + c) - 1/2*I*sin(d*x^2 + c) + 1/2)*sin(d*x^2 + c) + 2*( a*b*d*x^2 + a*b*c)*log(-cos(d*x^2 + c) + I*sin(d*x^2 + c) + 1)*sin(d*x^2 + c) + 2*(a*b*d*x^2 + a*b*c)*log(-cos(d*x^2 + c) - I*sin(d*x^2 + c) + 1)*si n(d*x^2 + c))/(d^2*sin(d*x^2 + c))
\[ \int x^3 \left (a+b \csc \left (c+d x^2\right )\right )^2 \, dx=\int x^{3} \left (a + b \csc {\left (c + d x^{2} \right )}\right )^{2}\, dx \]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 604 vs. \(2 (107) = 214\).
Time = 0.31 (sec) , antiderivative size = 604, normalized size of antiderivative = 4.83 \[ \int x^3 \left (a+b \csc \left (c+d x^2\right )\right )^2 \, dx=\frac {1}{4} \, a^{2} x^{4} - \frac {4 \, b^{2} d x^{2} \cos \left (2 \, d x^{2} + 2 \, c\right ) + 4 i \, b^{2} d x^{2} \sin \left (2 \, d x^{2} + 2 \, c\right ) - 2 \, {\left (2 \, a b d x^{2} - b^{2} - {\left (2 \, a b d x^{2} - b^{2}\right )} \cos \left (2 \, d x^{2} + 2 \, c\right ) + {\left (-2 i \, a b d x^{2} + i \, b^{2}\right )} \sin \left (2 \, d x^{2} + 2 \, c\right )\right )} \arctan \left (\sin \left (d x^{2} + c\right ), \cos \left (d x^{2} + c\right ) + 1\right ) - 2 \, {\left (b^{2} \cos \left (2 \, d x^{2} + 2 \, c\right ) + i \, b^{2} \sin \left (2 \, d x^{2} + 2 \, c\right ) - b^{2}\right )} \arctan \left (\sin \left (d x^{2} + c\right ), \cos \left (d x^{2} + c\right ) - 1\right ) + 4 \, {\left (a b d x^{2} \cos \left (2 \, d x^{2} + 2 \, c\right ) + i \, a b d x^{2} \sin \left (2 \, d x^{2} + 2 \, c\right ) - a b d x^{2}\right )} \arctan \left (\sin \left (d x^{2} + c\right ), -\cos \left (d x^{2} + c\right ) + 1\right ) - 4 \, {\left (a b \cos \left (2 \, d x^{2} + 2 \, c\right ) + i \, a b \sin \left (2 \, d x^{2} + 2 \, c\right ) - a b\right )} {\rm Li}_2\left (-e^{\left (i \, d x^{2} + i \, c\right )}\right ) + 4 \, {\left (a b \cos \left (2 \, d x^{2} + 2 \, c\right ) + i \, a b \sin \left (2 \, d x^{2} + 2 \, c\right ) - a b\right )} {\rm Li}_2\left (e^{\left (i \, d x^{2} + i \, c\right )}\right ) + {\left (2 i \, a b d x^{2} - i \, b^{2} + {\left (-2 i \, a b d x^{2} + i \, b^{2}\right )} \cos \left (2 \, d x^{2} + 2 \, c\right ) + {\left (2 \, a b d x^{2} - b^{2}\right )} \sin \left (2 \, d x^{2} + 2 \, c\right )\right )} \log \left (\cos \left (d x^{2} + c\right )^{2} + \sin \left (d x^{2} + c\right )^{2} + 2 \, \cos \left (d x^{2} + c\right ) + 1\right ) + {\left (-2 i \, a b d x^{2} - i \, b^{2} + {\left (2 i \, a b d x^{2} + i \, b^{2}\right )} \cos \left (2 \, d x^{2} + 2 \, c\right ) - {\left (2 \, a b d x^{2} + b^{2}\right )} \sin \left (2 \, d x^{2} + 2 \, c\right )\right )} \log \left (\cos \left (d x^{2} + c\right )^{2} + \sin \left (d x^{2} + c\right )^{2} - 2 \, \cos \left (d x^{2} + c\right ) + 1\right )}{-4 i \, d^{2} \cos \left (2 \, d x^{2} + 2 \, c\right ) + 4 \, d^{2} \sin \left (2 \, d x^{2} + 2 \, c\right ) + 4 i \, d^{2}} \]
1/4*a^2*x^4 - (4*b^2*d*x^2*cos(2*d*x^2 + 2*c) + 4*I*b^2*d*x^2*sin(2*d*x^2 + 2*c) - 2*(2*a*b*d*x^2 - b^2 - (2*a*b*d*x^2 - b^2)*cos(2*d*x^2 + 2*c) + ( -2*I*a*b*d*x^2 + I*b^2)*sin(2*d*x^2 + 2*c))*arctan2(sin(d*x^2 + c), cos(d* x^2 + c) + 1) - 2*(b^2*cos(2*d*x^2 + 2*c) + I*b^2*sin(2*d*x^2 + 2*c) - b^2 )*arctan2(sin(d*x^2 + c), cos(d*x^2 + c) - 1) + 4*(a*b*d*x^2*cos(2*d*x^2 + 2*c) + I*a*b*d*x^2*sin(2*d*x^2 + 2*c) - a*b*d*x^2)*arctan2(sin(d*x^2 + c) , -cos(d*x^2 + c) + 1) - 4*(a*b*cos(2*d*x^2 + 2*c) + I*a*b*sin(2*d*x^2 + 2 *c) - a*b)*dilog(-e^(I*d*x^2 + I*c)) + 4*(a*b*cos(2*d*x^2 + 2*c) + I*a*b*s in(2*d*x^2 + 2*c) - a*b)*dilog(e^(I*d*x^2 + I*c)) + (2*I*a*b*d*x^2 - I*b^2 + (-2*I*a*b*d*x^2 + I*b^2)*cos(2*d*x^2 + 2*c) + (2*a*b*d*x^2 - b^2)*sin(2 *d*x^2 + 2*c))*log(cos(d*x^2 + c)^2 + sin(d*x^2 + c)^2 + 2*cos(d*x^2 + c) + 1) + (-2*I*a*b*d*x^2 - I*b^2 + (2*I*a*b*d*x^2 + I*b^2)*cos(2*d*x^2 + 2*c ) - (2*a*b*d*x^2 + b^2)*sin(2*d*x^2 + 2*c))*log(cos(d*x^2 + c)^2 + sin(d*x ^2 + c)^2 - 2*cos(d*x^2 + c) + 1))/(-4*I*d^2*cos(2*d*x^2 + 2*c) + 4*d^2*si n(2*d*x^2 + 2*c) + 4*I*d^2)
\[ \int x^3 \left (a+b \csc \left (c+d x^2\right )\right )^2 \, dx=\int { {\left (b \csc \left (d x^{2} + c\right ) + a\right )}^{2} x^{3} \,d x } \]
Timed out. \[ \int x^3 \left (a+b \csc \left (c+d x^2\right )\right )^2 \, dx=\int x^3\,{\left (a+\frac {b}{\sin \left (d\,x^2+c\right )}\right )}^2 \,d x \]